package com.wideplay.warp.clustering;

import com.google.inject.Module;

import java.lang.annotation.Annotation;

/**
 * Created with IntelliJ IDEA.
 * On: 23/06/2007
 *
 * @author Dhanji R. Prasanna
 * @since 1.0
 */
class DataGridServiceBuilderImpl implements ClusterServiceBuilder {
    private final DataGridModule module;

    public DataGridServiceBuilderImpl(DataGridModule.ClusterCacheVendor vendor) {
        module = new DataGridModule(vendor);
    }

    public Module buildModule() {
        return module;
    }


    public ClusterServiceBuilder cluster(Class<? extends Annotation> clusterScopeAnnotation) {
        module.addClusterSpace(clusterScopeAnnotation);

        return this;
    }
}
